package com.banmoon.factory.simple;

import com.banmoon.factory.noodle.BeefNoodle;
import com.banmoon.factory.noodle.EggNoodle;
import com.banmoon.factory.noodle.MeatSauceNoodle;
import com.banmoon.factory.noodle.Noodle;

/**
 * 面食工厂
 */
public class NoodleFactory {

    public static Noodle getNoodle(int type){
        if(type==1001)
            return new BeefNoodle();
        if(type==1002)
            return new EggNoodle();
        if(type==1003)
            return new MeatSauceNoodle();
        System.out.println("未知的面食");
        return null;
    }

}
